﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--<%@ page language="java" import="java.util.* " pageEncoding="UTF-8"%>
<%@ page import="com.iWen.survey.dao.ConfigDAO" %>
<%@ page import="com.iWen.survey.dao.DAOFactory" %>
<%@ page import="com.iWen.survey.dto.Config"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
	ConfigDAO configdao=DAOFactory.getConfigDAO();
	Config cfg=configdao.findConfig();
 %> --%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>My JSP 'SysConfig.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <link rel="stylesheet" type="text/css" href="../Css/Admin.css">
    <script type="text/javascript" src="/Js/jquery-1.7.2.js"></script>
    <script src="${pageContext.request.contextPath}/Js/config/configadd.js"></script>
</head>
<body>
<div class=nav><a href=admin_main.jsp>桌面</a>»网站信息配置<br>
    <%--<form method="post" action="<%=basePath%>config/config.do" name="form1">--%>
    <form method="post" <%--action="/admin/config"--%> name="form1">
        <table class=table>
            <input type="hidden" id="configId" value="${config.id}">
            <tbody>
            <tr>
                <th colspan="3" align="center">系统配置项</th>
            </tr>
            <tr>
                <td>&nbsp;网站名称：</td>
                <td><input type="text" maxlength="50" size="30" name="sitename" id="sitename"
                           value="${config.sitename}"></td>
                <td>&nbsp;<font color=red>* </font>给网站起个名字，将显示在浏览器标题栏上</td>
            </tr>
            <tr>
                <td>&nbsp;网站URL：</td>
                <td><input type="text" maxlength="100" size="30" name="siteurl" id="siteurl" value="${config.siteurl}">
                </td>
                <td>&nbsp;<font color=red>*</font> 指定网站的网址，如: www.***.com<br></td>
            </tr>
            <tr>
                <td>&nbsp;网站开关：</td>

                <td><input id="a1" type="radio" name="isopen" value="0"
                           <c:if test="${config.isopen==0}">checked="checked"</c:if>>开启
                    <input id="a2" type="radio" name="isopen" value="1"
                           <c:if test="${config.isopen==1}">checked="checked"</c:if>>关闭
                </td>
                <script language="JavaScript">
                    $(function () {
                        $("#a1").click(function () {
                            document.getElementById("aaaa").style.visibility = "collapse";
                        });
                        $("#a2").click(function () {
                            document.getElementById("aaaa").style.visibility = "unset";
                        });
                    })
                </script>
                <td>&nbsp;</td>
            </tr>
            <tr id="aaaa" style="visibility: collapse">
                <td>&nbsp;关闭原因：</td>
                <%--<td width=70px valign="middle"><textarea cols="30" rows="3" name="closeword"></textarea></td>--%>
                <td width=70px valign="middle">
                    <textarea cols="30" rows="3" name="closeword" id="closeword">${config.closeword}</textarea>
                </td>
                <td>&nbsp;&nbsp;&nbsp; 在网站关闭时用户看到的信息</td>
            </tr>
            <tr>
                <td>&nbsp;版权信息：</td>
                <td><input type="text" maxlength="50" size="30" name="copyright" value="${config.copyright}"></td>
                </td>
            </tr>
            <tr>
                <td valign="top"><br></td>
                <td valign="top"><br></td>
                <td valign="top"><br></td>
            </tr>
            <tr>
                <td valign="top"><br></td>
                <td valign="top" align="center">
                    <input type="button" value="提交" id="configSubmit">&nbsp;&nbsp;&nbsp;
                    <input type="button" onclick="javascript:history.back();" value="取消">
                </td>
                <td valign="top"><br></td>
            </tr>
            <tr>
                <td valign="top"><br></td>
                <td valign="top"><br></td>
                <td valign="top"><br></td>
            </tr>
            </tbody>
        </table>
    </form>
</body>
<script type="text/javascript">
</script>
</html>

